Skip to content

feat: support google meet video conferencing in calendar +insert#506

Open
dumko2001 wants to merge 7 commits intogoogleworkspace:mainfrom
dumko2001:feature/issue-461-calendar-meet
Open

feat: support google meet video conferencing in calendar +insert#506
dumko2001 wants to merge 7 commits intogoogleworkspace:mainfrom
dumko2001:feature/issue-461-calendar-meet

Conversation

@dumko2001
Copy link

Description

This PR adds support for generating Google Meet video conferencing links when creating a calendar event via the +insert helper. By passing the --meet flag, a conferenceData create request is automatically added to the event body, and the conferenceDataVersion=1 parameter is appended to the request.

Dry Run Output:

{
  "body": {
    "conferenceData": {
      "createRequest": {
        "conferenceSolutionKey": {
          "type": "hangoutsMeet"
        },
        "requestId": "375507ec-2e48-4550-8cc8-704ffdc89e70"
      }
    },
    "end": {
      "dateTime": "2026-06-17T09:30:00Z"
    },
    "start": {
      "dateTime": "2026-06-17T09:00:00Z"
    },
    "summary": "Test Meet"
  },
  "dry_run": true,
  "is_multipart_upload": false,
  "method": "POST",
  "query_params": [
    [
      "conferenceDataVersion",
      "1"
    ]
  ],
  "url": "https://www.googleapis.com/calendar/v3/calendars/primary/events"
}

Checklist:

  • My code follows the AGENTS.md guidelines (no generated google-* crates).
  • I have run cargo fmt --all to format the code perfectly.
  • I have run cargo clippy -- -D warnings and resolved all warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have provided a Changeset file (e.g. via pnpx changeset) to document my changes.

@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2026

🦋 Changeset detected

Latest commit: 22f54c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@googleworkspace-bot googleworkspace-bot added area: distribution area: tui area: core Core CLI parsing, commands, error handling, utilities labels Mar 15, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new feature to the calendar helper, allowing users to easily create Google Calendar events with integrated Google Meet video conferencing. By adding a simple "--meet" flag to the "+insert" command, the application will automatically configure the event to include a unique Google Meet link. This enhancement streamlines the process of scheduling virtual meetings directly from the command line. Alongside this new functionality, the project's dependencies have been thoroughly reviewed and updated, ensuring a more streamlined and efficient build process.

Highlights

  • Google Meet Integration: Introduced a new "--meet" flag for the "calendar +insert" command, enabling automatic generation of Google Meet video conference links for new calendar events.
  • Dependency Management: Performed a significant cleanup and update of project dependencies in Cargo.lock and Cargo.toml, including the addition of the "uuid" crate for generating unique request IDs.
  • Enhanced Calendar Event Creation: The "+insert" command now supports adding conference data to event bodies and includes the necessary "conferenceDataVersion=1" API parameter when the "--meet" flag is used.
Changelog
  • .changeset/issue-461-calendar-meet.md
    • Added a new changeset file to document the Google Meet video conferencing feature.
  • Cargo.lock
    • Updated numerous package versions and removed several unused dependencies.
    • Introduced new dependencies like "cassowary", "paste", and "rustversion".
    • Adjusted versions for "crossterm", "compact_str", "darling", "deranged", "instability", "itertools", "lru", "num-conv", "ratatui", "strum", "time", "unicode-truncate", and "unicode-width".
  • Cargo.toml
    • Updated the "ratatui" dependency to version "0.29.0".
    • Added the "uuid" crate with the "v4" feature enabled.
  • src/helpers/calendar.rs
    • Added a new "--meet" argument to the "calendar +insert" subcommand.
    • Modified the "build_insert_request" function to conditionally add "conferenceData" to the event body and "conferenceDataVersion=1" to query parameters when the "--meet" flag is present.
    • Included a new example and tip in the help message for the "+insert" command.
    • Added a unit test to verify the correct generation of Google Meet conference data.
  • src/setup_tui.rs
    • Added a "use ratatui::prelude::Stylize;" statement.
Activity
  • The author, dumko2001, created this pull request to add Google Meet support.
  • The author has completed the checklist, including formatting, clippy warnings, adding tests, and providing a Changeset file.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a useful --meet flag to the calendar +insert command, allowing users to easily create Google Meet links for new events. The implementation is straightforward and includes a corresponding test case.

My main feedback is regarding the ratatui dependency downgrade from 0.30.0 to 0.29.0. This change, along with the extensive modifications to Cargo.lock, seems unrelated to the feature being added and should be moved to a separate pull request to avoid scope creep and potential unintended side effects.

I also have a suggestion to improve the clarity of the help text for the new flag.

Overall, a good feature addition with minor points to address.

@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for creating Google Meet links when inserting a calendar event. The implementation correctly adds the --meet flag and constructs the conferenceData in the request body. I have one suggestion to make the new test more robust by parsing the JSON output and asserting on the values directly, rather than using string contains checks.

Comment on lines +558 to +560
assert!(params.contains("\"conferenceDataVersion\":1"));
assert!(body.contains("\"conferenceSolutionKey\":{\"type\":\"hangoutsMeet\"}"));
assert!(body.contains("\"requestId\":"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

These assertions using contains are a bit weak and could pass even with malformed JSON or incorrect values. Parsing the JSON strings and asserting on the structured data would make the test more robust and prevent future regressions. For example, you could verify that requestId is a valid UUID.

Suggested change
assert!(params.contains("\"conferenceDataVersion\":1"));
assert!(body.contains("\"conferenceSolutionKey\":{\"type\":\"hangoutsMeet\"}"));
assert!(body.contains("\"requestId\":"));
let params_json: serde_json::Value = serde_json::from_str(&params).unwrap();
assert_eq!(params_json["conferenceDataVersion"], 1);
let body_json: serde_json::Value = serde_json::from_str(&body).unwrap();
let create_req = &body_json["conferenceData"]["createRequest"];
assert_eq!(create_req["conferenceSolutionKey"]["type"], "hangoutsMeet");
assert!(uuid::Uuid::parse_str(create_req["requestId"].as_str().unwrap()).is_ok());

@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a useful --meet flag to the calendar +insert helper for creating Google Meet links. The implementation is straightforward and includes a good test case. My main feedback is regarding a potential idempotency issue with the conference creation request. While important, I've suggested deferring this improvement to a follow-up PR to maintain focus and avoid scope creep in this initial implementation.

Comment on lines +467 to +475
if matches.get_flag("meet") {
body["conferenceData"] = json!({
"createRequest": {
"requestId": uuid::Uuid::new_v4().to_string(),
"conferenceSolutionKey": { "type": "hangoutsMeet" }
}
});
params["conferenceDataVersion"] = json!(1);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While this PR successfully adds the --meet flag, I've identified a potential idempotency issue. Using a random v4 UUID for the requestId means that if a user retries a failed command, a new Meet link might be generated, potentially leading to duplicate calendar events with different conference links.

To make this operation idempotent, generating a deterministic v5 UUID based on the event's details would be ideal. This ensures that running the same command multiple times will result in the same requestId, preventing duplicate conference data.

However, to avoid introducing changes outside the primary goal of this pull request and prevent scope creep, I recommend addressing this idempotency improvement in a separate, follow-up PR. This would involve updating the uuid crate features in Cargo.toml to include v5 and macro-diagnostics and implementing the deterministic UUID generation.

References
  1. Avoid introducing changes that are outside the primary goal of a pull request to prevent scope creep.

@googleworkspace-bot
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for creating Google Meet links when inserting a calendar event. The implementation looks good, with a new --meet flag and tests for the new functionality. However, there are two main points of feedback: several dependencies in Cargo.lock have been unexpectedly downgraded, which is a potential risk, and the idempotency key for the Google Meet conference request could be made more robust by including all relevant event details in its seed.

Comment on lines +460 to -462
version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This change downgrades several dependencies, including darling (e.g., from 0.20.11 to 0.20.10), instability (from 0.3.11 to 0.3.10), and unicode-width (from 0.2.2 to 0.2.0). Downgrading dependencies can re-introduce previously fixed bugs and should generally be avoided unless there is a strong reason. It's recommended to run cargo update to use the latest compatible versions.


if matches.get_flag("meet") {
let namespace = uuid::Uuid::NAMESPACE_DNS;
let seed_data = format!("{}:{}:{}", summary, start, end);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The seed for the idempotent requestId only includes summary, start, and end. This means that two different events with the same summary and time but different attendees, description, or location will generate the same requestId. To ensure true idempotency and avoid potential collisions, it's better to include all relevant event details in the seed. I recommend including location, description, and a sorted list of attendees in the seed_data if they are provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Core CLI parsing, commands, error handling, utilities area: distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants